package IMIC.NGUYENVANTINH.ARRAYLIST.EXCERCISE.EX01;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

import IMIC.NGUYENVANTINH.ARRAY.EXCERCISE.EX06.Student;

public class Views {
	public static void main(String[] args) {
		List<StudentEntity> listArr = new ArrayList<StudentEntity>();
		Scanner sc = new Scanner(System.in);
		boolean flag = false;
		do {
			StudentEntity student = new StudentEntity();
			System.out.print("Nhap Fullname sv:");
			student.setFullName(sc.nextLine());
			System.out.print("Nhap Rollnumber: ");
			student.setRollNumber(sc.nextLine());
			listArr.add(student);
			System.out.println("Ban muon nhap them sinh vien khong...");
			System.out.println("Nhap Y la co va N la khong....");
			String choise = sc.nextLine();
			if (choise.toUpperCase().equals("N")){
				flag = true;
			}

		} while (!flag);
		
		for (int i = 0; i < listArr.size(); i++) {
			System.out.println("Ten sv thu " +(i+1)+" "+listArr.get(i).getFullName());
			System.out.println("Ma sv thu " +(i+1)+" "+listArr.get(i).getRollNumber());
		}
	}

}
